package org.massdgames.thunder.server.domain;


public class Card {
    
    private int cardId;
    private String name;
    private CardType cardType;
    
    public int getCardId() {
        return cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CardType getCardType() {
        return cardType;
    }

    public void setCardType(CardType cardType) {
        this.cardType = cardType;
    }
    
    @Override
    public boolean equals(Object other) {
        Card otherCard = (Card) other;
        return this.getName().equals(otherCard.getName());
    }
    
    @Override
    public int hashCode() {
        return this.cardId + this.name.hashCode();
    }
    
    @Override
    public String toString() {
        return name;
    }
    
}

